package escritorio.Ui;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.WindowConstants;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;
import javax.swing.border.BevelBorder;
import javax.swing.JLabel;

import java.awt.Rectangle;
import java.awt.Color;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class CadastroFrm extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			@Override
			public void run() {
				try {
					CadastroFrm frame = new CadastroFrm();
					frame.setVisible(true);
					
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public CadastroFrm() {
		setBounds(new Rectangle(900, 300, 0, 0));
		setTitle("Cadastro de clientes, profissionais, processos, prazos e audi\u00EAncias");
		setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		setBounds(100, 100, 765, 435);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		JPanel panel = new JPanel();
		panel.setBorder(new BevelBorder(BevelBorder.RAISED, null, null, null, null));
		contentPane.add(panel, BorderLayout.NORTH);
		
		JButton btnClientePF = new JButton("ClientePF");
		btnClientePF.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				ClientePFFrm frame = new ClientePFFrm();
				frame.setVisible(true);
			}
		});
		panel.add(btnClientePF);
		
		JButton btnClientePJ = new JButton("ClientePJ");
		btnClientePJ.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				ClientePJFrm frame = new ClientePJFrm();
				frame.setVisible(true);
				frame.setLocationRelativeTo(null);
			}
		});
		panel.add(btnClientePJ);
		
		JButton btnProfissional = new JButton("Profissional");
		btnProfissional.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				AdvogadoFrm frame = new AdvogadoFrm();
				frame.setVisible(true);
				frame.setLocationRelativeTo(null);
			}
		});
		panel.add(btnProfissional);
		
		JButton btnSair = new JButton("Sair");
		btnSair.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				dispose();
			}
		});
		
		JButton btnProcesso = new JButton("Processo");
		btnProcesso.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				ProcessoFrm frame = new ProcessoFrm();
				frame.setVisible(true);
				frame.setLocationRelativeTo(null);
			}
		});
		panel.add(btnProcesso);
		
		JButton btnPrazo = new JButton("Prazo");
		btnPrazo.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				PrazoFrm frame = new PrazoFrm();
				frame.setVisible(true);
				frame.setLocationRelativeTo(null);
			}
		});
		panel.add(btnPrazo);
		
		JButton btnAudincia = new JButton("Audi\u00EAncia");
		btnAudincia.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				AudienciaFrm frame = new AudienciaFrm();
				frame.setVisible(true);
				frame.setLocationRelativeTo(null);
				
			}
		});
		panel.add(btnAudincia);
		
		JButton btnCustas = new JButton("Custas");
		btnCustas.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				CustaFrm frame = new CustaFrm();
				frame.setVisible(true);
				frame.setLocationRelativeTo(null);
			}
		});
		panel.add(btnCustas);
		panel.add(btnSair);
		
		JPanel panelLogo = new JPanel();
		panelLogo.setBackground(Color.WHITE);
		panelLogo.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
		contentPane.add(panelLogo, BorderLayout.CENTER);
		
		JLabel lblIcon = new JLabel("");
		lblIcon.setIcon(new ImageIcon("E:\\Downloads\\1292192712.png"));
		panelLogo.add(lblIcon);
	}

}
